package com.callrong.android.test;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.app.Activity;

public class BrowserActivity extends Activity {

	private WebView webView;
	private Button commitButton;
	private EditText httpPathEditText;
	private LinearLayout titleBarLinearLayout;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.browser);

		webView = (WebView) findViewById(R.id.webView);
		commitButton = (Button) findViewById(R.id.commitButton);
		httpPathEditText = (EditText) findViewById(R.id.httpPathEditText);
		titleBarLinearLayout = (LinearLayout) findViewById(R.id.titleBarLinearLayout);

		webView.loadUrl("http://sina.cn/?from=wap");

		commitButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				String httpPath = httpPathEditText.getText().toString().trim();
				webView.loadUrl(httpPath);
			}
		});

	}
}
